<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<form id="customerform" method="post" style="padding-top:1px">
    <input type="hidden" id="id" name="id"  >
    <table style="margin:6px; width: 98%">
        <tr style="height: 30px">
            <td class="label" width="80px" style="text-align: right">派单时间：</td>
            <td>
                <input type="text" name="createtime"  class="selectp" data-options="required:true" style="width:160px;height: 24px;">
            </td>
        </tr>
        <tr style="height: 30px">
            <td class="label" width="80px" style="text-align: right">接单时间：</td>
            <td>
                <input type="text" name="gettime"  class="selectp" data-options="required:true" style="width:160px;height: 24px;">
            </td>
        </tr>
        <tr style="height: 30px">
            <td class="label" width="80px" style="text-align: right">操作时间：</td>
            <td>
                <input type="text" name="optime"  class="selectp" data-options="required:true" style="width:160px;height: 24px;">
            </td>
        </tr>
        <tr style="height: 30px">
            <td class="label" width="80px" style="text-align: right">完成时间：</td>
            <td>
                <input type="text" name="stoptime"  class="selectp" data-options="required:true" style="width:160px;height: 24px;">
            </td>
        </tr>
    </table>
    <div id="default" style="padding: 20px;">任务评价: </div>
</form>
<script>
    $.fn.raty.defaults.path = '/static/plugins/raty/images';
    $(function() {
        $('#default').raty({
            click: function(score, evt) {
                //运维类型
                $.ajax({
                    type:'get',
                    url:'/task/updateStar',
                    data:{
                        id:$('#id').val(),
                        star:score
                    },
                    cache:false,
                    dataType:'json',
                    success:function(r){
                        if(r.statusCode == '200'){
                            $.messager.show({
                                title : r.title,
                                msg : r.message
                            });
                        }else{
                            $.messager.show({
                                title : '提示',
                                msg : '评价失败'
                            });
                        }
                    },
                    error:function(){
                        alert("请求失败")
                    }
                });
            }
        });
    });
</script>
</html>